using System.IO;

namespace GameFramework
{
    /// <summary>
    /// Implement this interface if you want to persist the status of the object into a binary stream.
    /// </summary>
    public interface IBinarySerializable
    {
        /// <summary>
        /// Write the status of the object into the binary stream.
        /// </summary>
        /// <param name="writer">The binary writer.</param>
        void Write(BinaryWriter writer);

        /// <summary>
        /// Read the status of the object from the binary stream.
        /// </summary>
        /// <param name="reader">The binary reader.</param>
        void Read(BinaryReader reader);
    }
}
